package a.f.g.a;

import java.util.HashMap;
import java.util.Map;

class ac
  implements jb
{
  private static final double a = 0.001D;
  private static final double b = 0.01D;
  private static final double c = 0.04D;
  private static final double d = 0.01D;
  private static final double e = 0.04D;
  public static final double f = 1.0D;
  public static final double g = 0.0D;
  double h;
  double i;
  double j;
  double k;
  private Map l = new HashMap();
  
  ac()
  {
    this(0.009000000000000001D, 0.039D, 0.01D, 0.04D);
  }
  
  ac(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    this.k = paramDouble3;
    this.h = paramDouble2;
    this.i = paramDouble1;
    this.j = paramDouble4;
  }
  
  public double a(cb paramcb, bb parambb)
  {
    if (!xb.r) {
      if (paramcb.j() == 1.0D) {
        return 0.0D;
      }
    }
    double d1 = a(paramcb);
    double d2 = paramcb.g() + d1;
    return Math.max(0.0D, Math.min(d2, 1.0D));
  }
  
  double a(cb paramcb)
  {
    boolean bool = xb.r;
    a_ locala_ = b(paramcb);
    locala_.a(paramcb.h());
    double d1 = locala_.f();
    double d2 = locala_.g();
    if (!bool)
    {
      if (d2 * d1 >= 0.0D)
      {
        if (!bool) {
          if (d1 > 0.0D) {
            return this.h * d1;
          }
        }
        return this.j * d1;
      }
      if (bool) {}
    }
    else if (d1 > 0.0D)
    {
      return this.i * d1;
    }
    return this.k * d1;
  }
  
  a_ b(cb paramcb)
  {
    a_ locala_ = (a_)this.l.get(paramcb);
    if (!xb.r) {
      if (locala_ == null)
      {
        locala_ = new a_();
        this.l.put(paramcb, locala_);
      }
    }
    return locala_;
  }
  
  static class a_
  {
    private f a = new pb();
    private f b = new pb();
    private double c;
    private double d;
    
    public double a()
    {
      return this.d;
    }
    
    public y b()
    {
      return this.b;
    }
    
    public void a(y paramy)
    {
      this.b.b(this.a.d());
      this.b.d(this.a.f());
      this.b.e(this.a.g());
      this.a.b(paramy.d());
      this.a.d(paramy.f());
      this.a.e(paramy.g());
      d();
    }
    
    private void d()
    {
      this.d = this.c;
      double d1 = this.a.c();
      double d2 = this.b.c();
      if (!xb.r)
      {
        if ((d1 == 0.0D) || (d2 == 0.0D)) {
          this.c = 0.0D;
        }
      }
      else {
        return;
      }
      this.c = ((this.a.d() * this.b.d() + this.a.f() * this.b.f() + this.a.g() * this.b.g()) / (d1 * d2));
    }
    
    public y e()
    {
      return this.a;
    }
    
    public double f()
    {
      return this.c;
    }
    
    public double g()
    {
      return this.d;
    }
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.g.a.ac
 * JD-Core Version:    0.7.0.1
 */